#!/bin/sh
#
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

# Install packages in component.

DI_COMPONENT_PACKAGES=$(installer_get "DI_COMPONENT_PACKAGES")
DI_COMPONENT_LANGUAGE=$(installer_get "DI_COMPONENT_LANGUAGE")

if [ ! -z "${DI_COMPONENT_PACKAGES}" ];then
# install component
install_package ${DI_COMPONENT_PACKAGES} || \
  warn "Failed to install packages: ${DI_COMPONENT_PACKAGES}"
fi

if [ ! -z "${DI_COMPONENT_LANGUAGE}" ];then
install_package ${DI_COMPONENT_LANGUAGE} || \
  warn "Failed to install packages: " ${DI_COMPONENT_LANGUAGE}
fi

return 0
